<!--63三级NGW型行星轮系传动比分配-->
<template>
  <div  class="sum" style="width: 100%; height: 100%;font-size: 16px;display: flex;overflow-x:auto;overflow-y:auto;font-size: 14px">
    <a-row style="height: 100%;width: 100%;">
      <a-col :span="24" style="height: 100%;border-radius: 3px" class="data_container">
<!--        <a-row style="height: 3%;width: 100%;background: #D7D7D7;border-radius: 3px">三级行星轮系传动比分配</a-row>-->
        <a-row style="height: 100%;width: 100%;" class="data_container">
          <a-row style="height: 33%;width: 100%;">
            <a-col :span="14" style="height: 100%;" class="data_container">
              <a-row style="height: 9%;width: 100%;background: #D7D7D7;border-radius: 3px">输入参数</a-row>
              <a-row style="height: 91%;width: 100%;">
                <a-col :span="14" style="height: 100%;">
                  <a-row style="height: 50%;width: 100%;">
                    <a-col :span="12" style="height: 100%;text-align: right">
                      <a-row style="height: 25%;width: 100%;">总传动比</a-row>
                      <a-row style="height: 25%;width: 100%;">第1级行星轮系最大宽径比上限值</a-row>
                      <a-row style="height: 25%;width: 100%;">第2级行星轮系最大宽径比上限值</a-row>
                      <a-row style="height: 25%;width: 100%;">第3级行星轮系最大宽径比上限值</a-row>
                    </a-col>
                    <a-col :span="12" style="height: 100%;text-align: center">
                      <a-row style="height: 25%;width: 100%;"><input type="text" v-model="input_data.R0"/></a-row>
                      <a-row style="height: 25%;width: 100%;"><input type="text" v-model="input_data.B1min"/></a-row>
                      <a-row style="height: 25%;width: 100%;"><input type="text" v-model="input_data.B2min"/></a-row>
                      <a-row style="height: 25%;width: 100%;"><input type="text" v-model="input_data.B3min"/></a-row>
                    </a-col>
                  </a-row>
                  <a-row style="height: 50%;width: 100%;">
                    <a-row style="height: 50%;width: 100%;">
                      <a-col :span="7" style="height: 100%;text-align: center;line-height: 48px"><input type="text" style="height: 60%;width: 60%;" v-model="input_data.ratio_D1_D2_min"/><span style="font-size: 20px">≦</span></a-col>
                      <a-col :span="10" style="height: 100%;text-align: center">
                        <a-row style="height: 25%;width: 100%;">第一级行星轮系外径</a-row>
                        <a-row style="height: 30%;width: 100%;">---------------------</a-row>
                        <a-row style="height: 45%;width: 100%;">第二级行星轮系外径</a-row>
                      </a-col>
                      <a-col :span="7" style="height: 100%;text-align: center;line-height: 48px;text-align: center"><span style="font-size: 20px">≦</span><input type="text" style="height: 60%;width: 60%;" v-model="input_data.ratio_D1_D2_max"/></a-col>
                    </a-row>
                    <a-row style="height: 50%;width: 100%;">
                      <a-col :span="7" style="height: 100%;text-align: center;line-height: 48px"><input type="text" style="height: 60%;width: 60%;" v-model="input_data.ratio_D2_D3_min"/><span style="font-size: 20px">≦</span></a-col>
                      <a-col :span="10" style="height: 100%;text-align: center">
                        <a-row style="height: 25%;width: 100%;">第二级行星轮系外径</a-row>
                        <a-row style="height: 30%;width: 100%;">---------------------</a-row>
                        <a-row style="height: 45%;width: 100%;">第三级行星轮系外径</a-row>
                      </a-col>
                      <a-col :span="7" style="height: 100%;text-align: center;line-height: 48px;text-align: center"><span style="font-size: 20px">≦</span><input type="text" style="height: 60%;width: 60%;" v-model="input_data.ratio_D2_D3_max"/></a-col>
                    </a-row>
                  </a-row>
                </a-col>
                <a-col :span="10" style="height: 100%;">
                  <a-row style="height: 70%;width: 100%;">
                    <a-col :span="8" style="height: 100%;text-align: right">
                      <a-row style="height: 20%;width: 100%;"></a-row>
                      <a-row style="height: 20%;width: 100%;">6个行星轮</a-row>
                      <a-row style="height: 20%;width: 100%;">5个行星轮</a-row>
                      <a-row style="height: 20%;width: 100%;">4个行星轮</a-row>
                      <a-row style="height: 20%;width: 100%;">3个行星轮</a-row>
                    </a-col>
                    <a-col :span="7" style="height: 100%; text-align: center">
                      <a-row style="height: 20%;width: 100%;">不均载系数</a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.bb1"/></a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.bb2"/></a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.bb3"/></a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.bb4"/></a-row>
                    </a-col>
                    <a-col :span="7" style="height: 100%; text-align: center">
                      <a-row style="height: 20%;width: 100%;">齿数比限制值</a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.aa1"/></a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.aa2"/></a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.aa3"/></a-row>
                      <a-row style="height: 20%;width: 100%;"><input type="text" style="width: 70%;" v-model="input_data.aa4"/></a-row>
                    </a-col>
                    <a-col :span="2" style="height: 100%;">
                      <button style="width: 20px;;height: 20%;padding: 0px" @click="showModal">!</button>
                      <a-modal
                          width="620px"
                          title="弹出图片"
                          :visible="visible"
                          :confirm-loading="confirmLoading"
                          @ok="handleOk"
                          @cancel="handleCancel"
                      >
                        <img src="@/assets/image/image_78_1.png">
                      </a-modal>
                    </a-col>
                  </a-row>
                  <a-row style="height: 30%;width: 100%;">
                    <a-col :span="15" style="height: 100%;"></a-col>
                    <a-col :span="9" style="height: 100%;">
                      <button style="margin-top: 10px;width: 79%;" @click="figure">计算</button>
                    </a-col>
                  </a-row>
                </a-col>
              </a-row>
            </a-col>
            <a-col :span="10" style="height: 100%;">
              <img src='@/assets/image/image_78_2.png' style="width: 100%;height: 100%;">
            </a-col>
          </a-row>
          <a-row style="height: 33%;width: 100%;" class="data_container">
            <a-row style="height: 8%;width: 100%;background: #D7D7D7">以外径最小为目标函数</a-row>
            <a-row style="height: 92%;width: 100%;">
              <el-table
                  :data="tableData"
                  height="100%"
                  stripe
                  style="width: 100%;font-size: 10px">
                <el-table-column
                    prop="date1"
                    label="第1级行星轮个数"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date2"
                    label="第2级行星轮个数"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date3"
                    label="第3级行星轮个数"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date4"
                    label="第1级行星轮齿数比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date5"
                    label="第2级行星轮齿数比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date6"
                    label="第3级行星轮齿数比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date7"
                    label="总体积表征量"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date8"
                    label="第1级齿圈半径表征量"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date9"
                    label="第2级齿圈半径表征量"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date10"
                    label="第3级齿圈半径表征量"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date11"
                    label="第1级行星轮系齿圈宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date12"
                    label="第2级行星轮系齿圈宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date13"
                    label="第3级行星轮系齿圈宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date14"
                    label="第1级头际最大宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date15"
                    label="第2级头际最大宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date16"
                    label="第3级头际最大宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date17"
                    label="第1级与第2级宽径比"
                    width="85">
                </el-table-column>
                <el-table-column
                    prop="date18"
                    label="第2级与第3级宽径比"
                    width="85">
                </el-table-column>
              </el-table>
            </a-row>
          </a-row>
          <a-row style="height: 34%;width: 100%">
            <a-col :span="11" style="height: 100%" class="data_container">
              <a-row style="height: 8%;width: 100%;background: #D7D7D7;border-radius: 3px">以体积最小为目标函数</a-row>
              <a-row style="height: 92%;width: 100%;">
                <el-table
                    :data="tableData1"
                    height="93%"
                    stripe
                    style="width: 100%;font-size: 12px">
                  <el-table-column
                      prop="date1"
                      label="第1级行星轮个数"
                      width="75">
                  </el-table-column>
                  <el-table-column
                      prop="date2"
                      label="第2级行星轮个数"
                      width="75">
                  </el-table-column>
                  <el-table-column
                      prop="date3"
                      label="第3级行星轮个数"
                      width="75">
                  </el-table-column>
                  <el-table-column
                      prop="date4"
                      label="第1级行星轮齿数比"
                      width="75">
                  </el-table-column>
                  <el-table-column
                      prop="date5"
                      label="第2级行星轮齿数比"
                      width="74">
                  </el-table-column>
                  <el-table-column
                      prop="date6"
                      label="第3级行星轮齿数比"
                      width="74">
                  </el-table-column>
                  <el-table-column
                      prop="date7"
                      label="总体积表征量"
                      width="74">
                  </el-table-column>
                </el-table>
              </a-row>
            </a-col>
            <a-col :span="13" style="height: 100%;">
              <img src='@/assets/image/image_78_3.png' style="width: 100%;height: 90%;">
            </a-col>
          </a-row>
        </a-row>
      </a-col>
<!--      <a-col :span="6" style="height: 100%;">-->
<!--        -->
<!--      </a-col>-->
    </a-row>
  </div>
</template>

<script>

import {OptiRatio_3stageP_increase_last} from "@/api/file";

export default {
name: "OptiRatio_3stageP_increase_last",
  created() {
    document.title='三级NGW型行星轮系传动比分配'
    this.$store.state.file.key=63
  },
  data(){
    return{
      visible: false,
      confirmLoading: false,
      input_data:this.$store.state.file.dataList[63],
      tableData: [],
      tableData1:[]
    }
  },
  methods:{
    showModal() {
      this.visible = true;
    },
    //点击ok
    handleOk() {

      this.visible = false;
    },
    //点击cancel
    handleCancel() {
      console.log('Clicked cancel button');
      this.visible = false;
    },
    figure(){
      OptiRatio_3stageP_increase_last(this.input_data).then(res=>{
        this.tableData1.splice(0)
        this.tableData.splice(0)
         let number=res[0].result.length;
         for(let i=0;i<number;i++){
           this.tableData.push({
             date1:res[0].result[i][0]+'',
             date2:res[0].result[i][1],
             date3:res[0].result[i][2],
             date4:res[0].result[i][3],
             date5:res[0].result[i][4],
             date6:res[0].result[i][5],
             date7:res[0].result[i][6],
             date8:res[0].result[i][7],
             date9:res[0].result[i][8],
             date10:res[0].result[i][9],
             date11:res[0].result[i][10],
             date12:res[0].result[i][11],
             date13:res[0].result[i][12],
             date14:res[0].result[i][13],
             date15:res[0].result[i][14],
             date16:res[0].result[i][15],
             date17:res[0].result[i][16],
             date18:res[0].result[i][17],
           })

        }
        let number1=res[1].result.length;
        for(let i=0;i<number1;i++){
          this.tableData1.push({
            date1:res[1].result[i][0],
            date2:res[1].result[i][1],
            date3:res[1].result[i][2],
            date4:res[1].result[i][3],
            date5:res[1].result[i][4],
            date6:res[1].result[i][5],
            date7:res[1].result[i][6],
          })
        }
      })
    }
  }
}
</script>

<style scoped>
.data_container{
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 5px;
  box-shadow:2px 2px 3px #aaaaaa;
}
input{
  height: 80%;
  text-align: center;
}
</style>